#!/bin/bash
# Copyright 2020-2022, Huawei Technologies Co. Ltd.
#
# ALL RIGHTS RESERVED
#
# Compile media/hal project, this is the entrance script

# error out on errors
set -e
OUT_DIR="$1"

function main(){
    CUR_DIR=$(cd $(dirname "$0");pwd)

    cp -rf $CUR_DIR/lib/lib* $OUT_DIR/
    mkdir -p $OUT_DIR/usr/share
    cp -rf $CUR_DIR/usr/share/udhcpc $OUT_DIR/usr/share
    chmod 766 $OUT_DIR/usr/share/udhcpc/*
    cp -rf $CUR_DIR/usr/share/ax $OUT_DIR/usr/share
}

main "$@"
